#include "setuserinfo.h"
#include "ui_setuserinfo.h"

SetUserInfo::SetUserInfo(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::SetUserInfo)
{
    ui->setupUi(this);
}

SetUserInfo::~SetUserInfo()
{
    delete ui;
    qDebug() << "设置用户信息的对话框的析构函数调用";
}

QString SetUserInfo::getName() const
{
    return ui->lineEdit_name->text();
}

int SetUserInfo::getAge() const
{
    return ui->spinBox->value();
}

void SetUserInfo::Initwidget(const QString & name, int age)
{
    ui->lineEdit_name->setText(name);
    ui->spinBox->setValue(age);
}
